function online() {
	var params = "";
	new Ajax.Request("json/online", {
		method : "post",
		parameters : params,
		onComplete : function(request) {
			var res = request.responseText.evalJSON();
			document.getElementById("online").innerHTML = "当前在线人数："
					+ res["result"]["online"];
		},
		asynchronous : true
	});

}

function outline() {
	var params = "";
	new Ajax.Request("json/logout", {
		method : "post",
		parameters : params,
		onComplete : function(request) {
			var res = request.responseText.evalJSON();

			window.location.href = "login.html";
		},
		asynchronous : true
	});
}

function compareTime(time) {
	var myDate = new Date();
	d = myDate.getFullYear();
	m = myDate.getMonth();
	r = myDate.getDate();
	h = myDate.getHours();
	f = myDate.getMinutes();
	s = myDate.getSeconds();
	mm = m + 1;
	var startDate = time;
	var startDateTemp = startDate.split(" ");
	var arrStartDate = startDateTemp[0].split("-");
	var arrStartTime = startDateTemp[1].split(":");
	var allStartDate = new Date(arrStartDate[0], arrStartDate[1],
			arrStartDate[2], arrStartTime[0], arrStartTime[1]);
	var allEndDate = new Date(d, mm, r, h, f);
	if (allStartDate.getTime() >= allEndDate.getTime()) {
		return "大于";
	} else {
		return "小于";
	}
}

function check_validate1(value) {
	// 定义正则表达式部分
	var reg = /^\d+$/;
	if (value.match(reg)) {

		return false;
	}
	return true;
}